@import '@scalar/api-reference-react/style.css';

/* Scalar Theme */
:root {
  --scalar-font: var(--ifm-font-family-base);
  --scalar-font-code: var(--ifm-font-family-monospace);
  --scalar-border-width: 1px;
}
.scalar-api-reference {
  --refs-header-height: var(--ifm-navbar-height);
}
.scalar-api-reference.references-sidebar {
  --refs-sidebar-width: 300px;
}
/* basic theme */
html[data-theme='light'] body,
html[data-theme='light'] .scalar-card.dark-mode {
  --scalar-color-1: var(--ifm-font-color-base, #1c1e21);
  --scalar-color-2: var(--ifm-color-emphasis-700, #606770);
  --scalar-color-3: var(--ifm-color-emphasis-600, #8d949e);
  --scalar-color-accent: var(--ifm-menu-color-active, #277148);

  --scalar-background-1: color-mix(
    in srgb,
    var(--ifm-background-color, #fff) 0%,
    white
  );
  --scalar-background-2: color-mix(in srgb, rgba(0, 0, 0, 1) 4%, white);
  --scalar-background-3: color-mix(in srgb, rgba(0, 0, 0, 1) 8%, white);
  --scalar-background-accent: var(
    --ifm-menu-color-background-active,
    rgba(0, 0, 0, 0.05)
  );

  --scalar-border-color: var(--ifm-color-emphasis-300, #ebedf0);

  --scalar-color-green: #00a400;
  --scalar-color-red: #fa383e;
  --scalar-color-yellow: #ffba00;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;
  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}

html[data-theme='dark'] body,
.scalar-card.dark-mode {
  --scalar-color-1: var(--ifm-font-color-base, rgb(227, 227, 227));
  --scalar-color-2: var(--ifm-color-emphasis-700, #dadde1);
  --scalar-color-3: var(--ifm-color-emphasis-400, #8d949e);
  --scalar-color-accent: var(--ifm-menu-color-active, #1fa588);

  --scalar-background-1: var(--ifm-background-color, #1b1b1d);
  --scalar-background-2: color-mix(
    in srgb,
    rgba(255, 255, 255, 1) 6%,
    var(--ifm-background-color)
  );
  --scalar-background-3: color-mix(
    in srgb,
    rgba(255, 255, 255, 1) 12%,
    var(--ifm-background-color)
  );
  --scalar-background-accent: var(
    --ifm-menu-color-background-active,
    hsla(0, 0%, 100%, 0.05)
  );

  --scalar-border-color: var(--ifm-color-emphasis-200, #444950);

  --scalar-color-green: #00a400;
  --scalar-color-red: #fa383e;
  --scalar-color-yellow: #ffba00;
  --scalar-color-blue: #3578e5;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;
}
.sidebar-group-item:has(.active_page) .sidebar-group-item__folder {
  color: var(--scalar-color-accent);
}
/* Document Sidebar */
.t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-border-color: var(--scalar-border-color);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-color-active: var(--scalar-color-accent);
  --scalar-sidebar-search-background: var(
    --docsearch-searchbox-background,
    transparent
  );
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
  --scalar-sidebar-search--color: var(--scalar-color-3);
}
html[data-theme='light'] body .t-doc__sidebar {
  --scalar-sidebar-item-hover-background: var(
    --ifm-menu-color-background-hover,
    rgba(0, 0, 0, 0.05)
  );
}
html[data-theme='dark'] body .t-doc__sidebar {
  --scalar-sidebar-item-hover-background: var(
    --ifm-menu-color-background-hover,
    hsla(0, 0%, 100%, 0.05)
  );
}
.references-rendered .section-header {
  color: var(--ifm-heading-color, var(--scalar-color-1));
}
.references-rendered .section-container:nth-of-type(2) {
  border-top: none !important;
}
.scalar-card-checkbox .scalar-card-checkbox-checkmark:after,
html[data-theme='light'] body .api-client-drawer {
  --scalar-background-1: white;
}

/* Headless UI Shims */
#headlessui-portal-root {
  position: fixed !important;
  width: 100%;
}
#__docusaurus[aria-hidden='true'] ~ #headlessui-portal-root {
  position: relative !important;
}

.sidebar-heading.sidebar-group-item__folder {
  flex-direction: row-reverse;
}
.sidebar-heading-chevron {
  transition: all 0.3s ease-in-out;
  border-radius: var(--scalar-radius);
}
.sidebar-heading-chevron:before {
  background: var(--ifm-menu-link-sublist-icon) 50% / 2rem 2rem;
  height: 1.25rem;
  transform: rotate(90deg);
  transition: transform var(--ifm-transition-fast) linear;
  width: 1.25rem;
  content: '';
  filter: var(--ifm-menu-link-sublist-icon-filter);
}
.sidebar-heading-chevron:hover {
  background-color: var(--ifm-menu-color-background-hover);
}
.sidebar-heading-chevron .scalar-icon-button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.sidebar-group-item:has(ul) .sidebar-heading-chevron:before {
  transform: rotate(180deg);
}
.sidebar-heading-chevron svg {
  color: transparent;
}
.sidebar-heading {
  margin-top: 2px;
  --scalar-mini: auto !important;
}
.sidebar-heading-link p {
  font-family: var(--ifm-font-family-base);
  font-weight: 500;
}
.sidebar-indent-nested .sidebar-heading {
  --scalar-sidebar-indent-base: 6px;
}
.sidebar .darklight {
  display: none !important;
}
.darklight-reference-promo {
  padding-top: 12px !important;
  --scalar-mini: auto;
}
.sidebar-search,
.sidebar-search-input {
  --scalar-mini: 16px;
}
.references-header {
  pointer-events: none;
}
.sidebar-search-shortcut {
  display: flex;
}
.sidebar-search-shortcut .sidebar-search-key {
  font-family: var(--scalar-font-code);
  font-size: 15px;
  border: 0;
  border-radius: 3px;
}
.t-doc__sidebar {
  max-height: calc(100dvh - var(--ifm-navbar-height));
  position: sticky;
  top: var(--ifm-navbar-height);
}
.references-layout {
  overflow: initial !important;
  grid-template-rows: 0 repeat(2, auto) !important;
}
.references-navigation-list {
  height: 100% !important;
}
.section-column:nth-of-type(2) {
  max-height: calc(100dvh - var(--ifm-navbar-height));
}
.scalar-card {
  --full-height: calc(100dvh - var(--ifm-navbar-height));
  max-height: calc(
    ((var(--full-height) - var(--refs-header-height)) - 60px) / 2
  );
}
.scalar-card .scalar-codeblock-pre {
  padding: 0;
}
.sidebar-heading-chevron {
  padding: var(--ifm-menu-link-padding-vertical)
    var(--ifm-menu-link-padding-horizontal);
  margin: 0 !important;
  margin-right: -9px !important;
}
.schema-properties-open > .schema-card-title {
  backdrop-filter: blur(50px);
}
@container narrow-references-container (max-width: 900px) {
  .section {
    padding-top: calc(var(--refs-header-height) + 48px) !important;
  }
}
@media screen and (max-width: 996px) {
  .references-header {
    pointer-events: all;
    top: calc(var(--refs-header-height) + 12px) !important;
    margin: 0 24px;
    height: 36px !important;
    position: fixed !important;
    bottom: 24px;
    top: initial !important;
    width: calc(100% - 48px);
  }
  .references-mobile-header {
    border-radius: 6px;
    gap: 0 !important;
    background: var(--scalar-background-3) !important;
    border: none !important;
  }
  .references-mobile-breadcrumbs:empty:before {
    content: 'Menu';
  }
  .references-header .scalar-icon-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: block;
    height: 100%;
  }
  .t-doc__sidebar {
    position: fixed !important;
    bottom: 72px;
    width: calc(100dvw - 48px) !important;
    height: calc(100dvh - var(--refs-header-height) - 84px) !important;
    left: 24px;
    top: initial !important;
  }
  .t-doc__sidebar .sidebar {
    border-right: none !important;
  }
  html[data-theme='light'] body .sidebar {
    backdrop-filter: blur(50px);
  }
  .references-navigation-list {
    border: 1px solid var(--scalar-border-color) !important;
    border-radius: 12px;
  }
}

/** Hide credentials */
.credentials {
  font-size: 0 !important;
  color: transparent;
}

/** Show a few dots instead */
.credentials::after {
  content: '·····';
  font-size: var(--scalar-small);
  color: var(--scalar-color-3);
  user-select: none;
}

.scalar-app {
  code.hljs * {
    font-size: var(--scalar-small);
    font-family: var(--scalar-font-code);
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.4;
    tab-size: 4;
  }
  code.hljs {
    font-size: var(--scalar-small);
    font-family: var(--scalar-font-code);
    display: inline-block;
    counter-reset: linenumber;
  }
  .hljs {
    background: transparent;
    color: var(--scalar-color-2);
  }

  .hljs .line::before {
    color: var(--scalar-color-3);
    display: inline-block;
    counter-increment: linenumber;
    content: counter(linenumber);
    margin-right: 0.7em;
    /* Variable is set on the code element by the plugin when line numbers are used */
    min-width: calc(var(--line-digits) * 1ch);
    text-align: right;
  }
  /* ------------------------------------------------------------- */
  /* Data types */
  .hljs-comment,
  .hljs-quote {
    color: var(--scalar-color-3);
    font-style: italic;
  }

  .hljs-number {
    color: var(--scalar-color-orange);
  }

  .hljs-regexp,
  .hljs-string {
    color: var(--scalar-color-blue);
  }

  /** Globals such as `var()` and `!important` */
  .hljs-built_in {
    color: var(--scalar-color-blue);
  }

  /** Class initializers such as `Array` or `Date` */
  /** Type declarations such as `Record` */
  .hljs-title.class_ {
    color: var(--scalar-color-1);
  }

  /** Language indicators such as `new`, `const`, or `function` in JS  */
  .hljs-keyword {
    color: var(--scalar-color-purple);
  }

  /** Function names when declaring and calling */
  .hljs-title.function_ {
    color: var(--scalar-color-orange);
  }

  /** Template substitution */
  .hljs-subst {
    color: var(--scalar-color-blue);
  }

  /** HTML Tag name */
  .hljs-name {
    color: var(--scalar-color-blue);
  }

  /** Attribute name (ex. `class`, `id`) */
  .hljs-attr,
  .hljs-attribute {
    color: var(--scalar-color-1);
  }

  .hljs-addition,
  .hljs-literal,
  .hljs-selector-tag,
  .hljs-type {
    color: var(--scalar-color-green);
  }

  .hljs-selector-attr,
  .hljs-selector-pseudo {
    color: var(--scalar-color-orange);
  }
  .hljs-doctag {
    color: var(--scalar-color-blue);
  }

  .hljs-section,
  .hljs-title {
    color: var(--scalar-color-blue);
  }

  .hljs-selector-id,
  .hljs-template-variable,
  .hljs-variable {
    color: var(--scalar-color-1);
  }

  .hljs-name,
  .hljs-section,
  .hljs-strong {
    font-weight: var(--scalar-semibold);
  }

  .hljs-bullet,
  .hljs-link,
  .hljs-meta,
  .hljs-symbol {
    color: var(--scalar-color-blue);
  }

  .hljs-deletion {
    color: var(--scalar-color-red);
  }

  .hljs-formula {
    background: var(--scalar-color-1);
  }

  .hljs-emphasis {
    font-style: italic;
  }

  /* -------------------------------------------------------------- */
  /* Language specific overrides */

  /** For HTML we leave the content strings brighter */
  .hljs.language-html {
    color: var(--scalar-color-1);
  }

  /** For HTML make the attr text different than the content */
  .hljs.language-html .hljs-attr {
    color: var(--scalar-color-2);
  }

  .hljs.language-curl .hljs-keyword {
    color: var(--scalar-color-orange);
  }

  .hljs.language-curl .hljs-string {
    color: var(--scalar-color-1);
  }

  .hljs.language-curl .hljs-literal {
    color: var(--scalar-color-blue);
  }

  .hljs.language-curl .hljs-literal {
    color: var(--scalar-color-blue);
  }

  /** Compromise here */
  .hljs.language-cpp .hljs-built_in {
    /* color: var(--scalar-color-1); */
  }

  .hljs.language-php .hljs-variable {
    color: var(--scalar-color-blue);
  }

  .hljs.language-objectivec .hljs-meta {
    color: var(--scalar-color-1);
  }

  .hljs.language-objectivec .hljs-built_in {
    color: var(--scalar-color-orange);
  }

  .hljs-built_in {
    color: var(--scalar-color-orange);
  }

  .markdown {
    font-family: var(--scalar-font);
    color: var(--scalar-color-1);
    word-break: break-word;
  }

  /* Apply base padding for all block elements */
  .markdown h1,
  .markdown h2,
  .markdown h3,
  .markdown h4,
  .markdown h5,
  .markdown h6,
  .markdown p,
  .markdown div,
  .markdown img,
  .markdown details,
  .markdown summary,
  .markdown ul,
  .markdown ol,
  .markdown table,
  .markdown blockquote,
  .markdown code {
    margin: 12px 0;
  }

  .markdown details {
    margin: 12px 0;
    color: var(--scalar-color-1);
  }
  .markdown summary {
    display: block;
    margin: 12px 0;
    padding-left: 20px;
    position: relative;
    font-weight: var(--scalar-semibold);
    cursor: pointer;
    user-select: none;
  }

  .markdown summary::after {
    display: block;
    content: '';

    position: absolute;
    top: 1px;
    left: 1px;

    width: 16px;
    height: 16px;

    background-color: var(--scalar-color-3);
    mask-image: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.25 19.5L15.75 12L8.25 4.5" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  }

  .markdown summary:hover::after {
    background-color: var(--scalar-color-1);
  }

  .markdown details[open] summary::after {
    transform: rotate(90deg);
  }

  /* Fix for Safari displaying default caret next to `<summary>` */
  .markdown summary::-webkit-details-marker {
    display: none;
  }

  .markdown img {
    overflow: hidden;
    border-radius: var(--scalar-radius);
    max-width: 100%;
  }
  /* Don't add margin to the first block */
  .markdown > :first-child {
    margin-top: 0;
    margin-bottom: 0;
  }

  .markdown h1 {
    --font-size: 1.4em;
  }

  .markdown h2 {
    --font-size: 1.25em;
  }

  .markdown h3 {
    --font-size: 1.1em;
  }

  .markdown h4 {
    --font-size: 1em;
  }

  .markdown h6 {
    --font-size: 1em;
  }
  .markdown h1,
  .markdown h2,
  .markdown h3,
  .markdown h4,
  .markdown h5,
  .markdown h6 {
    font-size: var(--font-size);
    margin: 18px 0 6px;
    font-weight: var(--scalar-bold);
    display: block;
    line-height: 1.45;
  }
  .markdown b,
  .markdown strong {
    font-weight: var(--scalar-bold);
  }
  .markdown p {
    color: var(--scalar-color-1);
    font-weight: var(--font-weight, var(--scalar-regular));
    line-height: 1.5;
    margin-bottom: 0;
    display: block;
  }

  .markdown ul,
  .markdown ol {
    padding-left: 24px;
    line-height: 1.5;
    margin: 12px 0;
    display: block;
  }

  .markdown ul {
    list-style: disc;
  }

  .markdown ol {
    list-style: decimal;
  }

  .markdown ul.contains-task-list {
    list-style: none;
    padding-left: 0;
  }

  .markdown li {
    margin: 6px 0;
    display: list-item;
  }
  .markdown ul:first-of-type li:first-of-type {
    margin-top: 0;
  }
  .markdown a {
    color: var(--scalar-color-accent);
    text-decoration: var(--scalar-text-decoration);
    cursor: pointer;
  }
  .markdown a:hover {
    text-decoration: var(--scalar-text-decoration-hover);
  }
  .markdown em {
    font-style: italic;
  }
  .markdown sup {
    font-size: var(--scalar-micro);
    vertical-align: super;
    font-weight: 450;
  }
  .markdown sub {
    font-size: var(--scalar-micro);
    vertical-align: sub;
    font-weight: 450;
  }
  .markdown del {
    text-decoration: line-through;
  }
  .markdown code {
    font-family: var(--scalar-font-code);
    background-color: var(--scalar-background-2);
    box-shadow: 0 0 0 1px var(--scalar-border-color);
    font-size: var(--scalar-micro);
    border-radius: 2px;
    padding: 0 3px;
  }

  .markdown pre code {
    display: block;
    white-space: pre;
    padding: 12px;
    line-height: 1.5;
    margin: 12px 0;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    max-width: 100%;
    min-width: 100px;
  }

  .markdown hr {
    border: none;
    border-bottom: 1px solid var(--scalar-border-color);
  }

  .markdown blockquote {
    border-left: 3px solid var(--scalar-border-color);
    padding-left: 12px;
    margin: 0;
    display: block;
  }

  .markdown table {
    display: block;
    overflow-x: auto;
    position: relative;
    border-collapse: collapse;
    width: max-content;
    max-width: 100%;
    margin: 1em 0;
    box-shadow: 0 0 0 1px var(--scalar-border-color);
    border-radius: var(--scalar-radius-lg);
  }
  .markdown tbody {
    display: table-row-group;
    vertical-align: middle;
  }
  .markdown thead {
    display: table-header-group;
    vertical-align: middle;
  }

  .markdown tr {
    display: table-row;
    border-color: inherit;
    vertical-align: inherit;
  }
  .markdown td,
  .markdown th {
    display: table-cell;
    vertical-align: inherit;
    min-width: 1em;
    padding: 6px 9px;
    vertical-align: top;
    line-height: 1.5;
    position: relative;
    word-break: initial;
    font-size: var(--scalar-small);
    color: var(--scalar-color-1);
    font-weight: var(--font-weight, var(--scalar-regular));
    border-right: 1px solid var(--scalar-border-color);
    border-bottom: 1px solid var(--scalar-border-color);
  }

  .markdown td > *,
  .markdown th > * {
    margin-bottom: 0;
  }
  .markdown th:empty {
    display: none;
  }
  .markdown td:first-of-type,
  .markdown th:first-of-type {
    border-left: none;
  }

  .markdown td:last-of-type,
  .markdown th:last-of-type {
    border-right: none;
  }

  .markdown tr:last-of-type td {
    border-bottom: none;
  }

  .markdown th {
    font-weight: var(--scalar-semibold) !important;
    text-align: left;
    border-left-color: transparent;
    background: var(--scalar-background-2);
  }

  .markdown tr > [align='left'] {
    text-align: left;
  }
  .markdown tr > [align='right'] {
    text-align: right;
  }
  .markdown tr > [align='center'] {
    text-align: center;
  }
  /* Docusaurus specific markdown - warning do not delete */
  .markdown pre {
    --ifm-pre-padding: 0;
    --ifm-spacing-vertical: 0;
    --ifm-pre-background: transparent;
    overflow: inherit;
  }
}
